from google.appengine.ext import ndb


university_list = ["TAU"]

class n_University(ndb.Model):
    uni_name = ndb.StringProperty(required = True)
    faculties_and_hugs = ndb.JsonProperty(default = {})
    facebook_to_google_map = ndb.JsonProperty(default = {})
    

class n_Hug(ndb.Model):
    semester = ndb.StringProperty(required = True)
    fac_name = ndb.StringProperty(required = True)
    hug_name = ndb.StringProperty(required = True)
    hug_num =  ndb.StringProperty(required = True)
    stats = ndb.JsonProperty(required = True)

class n_Course_syllabus(ndb.Model):
    course_num = ndb.StringProperty(required = True)
    syllabus = ndb.TextProperty(required = True)


class n_Lecturer_stats(ndb.Model):
    lecturers = ndb.JsonProperty(default = {})
    rector_years = ndb.JsonProperty(default = {})
    best100 = ndb.JsonProperty(default = {})
    
class n_Semester(ndb.Model):
    semester = ndb.StringProperty(required = True)
    courses_list = ndb.JsonProperty(required = True)

class n_User(ndb.Expando):
    _default_indexed = False
    userId = ndb.StringProperty(required = True)
    userEmail = ndb.StringProperty(required = True)
    nickName = ndb.StringProperty(required = True)
    saved_data = ndb.JsonProperty(default = {})
    chosenCoursesLists = ndb.JsonProperty(default = {"2015":[[],[]]})
    events = ndb.JsonProperty(default = [[],[],[]])
    
class n_Hug_bid(ndb.Model):
    fac_name = ndb.StringProperty(required = True)
    hug_name = ndb.StringProperty(required = True)
    hug_num =  ndb.StringProperty(required = True)
    bid = ndb.JsonProperty(required = True)
    
class n_Courses_stats(ndb.Model):
    semester = ndb.StringProperty(required = True)
    stats = ndb.JsonProperty(default = {})
